package com.miyu.system.pojo.system;

import com.miyu.system.utils.jpacomment.annotation.ColumnComment;
import com.miyu.system.utils.jpacomment.annotation.TableComment;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import jakarta.persistence.*;
import lombok.Data;

import java.io.Serializable;


/**
 * 角色表;
 * @author : miyu
 * @date : 2023-7-23
 */
@ApiModel(value = "角色表",description = "")
@Data
@Entity
@Table(name="sys_role")
@TableComment("角色表")
public class SysRole implements Serializable,Cloneable{
    /** 主键 */
    @Id
    @TableGenerator(name="id_gen",  table="sys_id_generator", pkColumnName="table_name", pkColumnValue="sys_role", valueColumnName="id_value", initialValue=1, allocationSize=1)
    @GeneratedValue(strategy= GenerationType.TABLE, generator="id_gen")
    @ApiModelProperty(value="主键",notes = "")
    @ColumnComment("主键")
    @Column(name = "role_id", nullable = false,length=11 )
    private Integer roleId ;
    /** 编码权限字符 */
    @ApiModelProperty(value="编码权限字符",notes = "")
    @ColumnComment("编码权限字符")
    @Column(name = "role_range", nullable = true,length=90 )
    private String roleRange ;
    /** 角色名称 */
    @ApiModelProperty(value="角色名称",notes = "")
    @ColumnComment("角色名称")
    @Column(name = "role_name", nullable = true,length=90 )
    private String roleName ;
    /** 是否停用 */
    @ApiModelProperty(value="是否停用",notes = "")
    @ColumnComment("是否停用")
    @Column(name = "is_stop", nullable = true,length=1 )
    private String isStop = "0" ;
    /** 备注 */
    @ApiModelProperty(value="备注",notes = "")
    @ColumnComment("备注")
    @Column(name = "memo", nullable = true,length=90 )
    private String memo ;
    /** 排序 */
    @ApiModelProperty(value="排序",notes = "")
    @ColumnComment("排序")
    @Column(name = "order_num", nullable = true,length=10 )
    private Integer orderNum ;
}